<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function fun(str){
      let newStr = str.split("").reverse().join("").replace("！","啊");
      let newStr2 =newStr.replace('h',"H");
      let newStr3 = newStr2.replace('w',"W").trim();
      console.log(newStr3); 
     
    }
    fun("helloworld我爱你！") //控制台打印结果为：啊你爱我dlroWolleH
</script>